<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新品有戏后台管理</title>
    <link href="__CSS__/boot.css" rel="stylesheet">
    <link href="__STATIC__/layui/css/layui.css" rel="stylesheet">
    <script src="__JS__/jquery.js"></script>
    <script src="__JS__/layer/layer.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <style>
        th{
            text-align: center;
            vertical-align: middle!important;
        }
    </style>
</head>
<body>
{include file="base/header" /}
<div style="float: right; margin-top: 5px;margin-bottom: 5px" class="box-title ">
    <form class="form-inline" action="{:url('index/postbusiness/recordsettlement')}" method="get">
        <input type="hidden" name="id" value="{$id}"/>
        <input type="text" name="title" value="<?php if(isset($title)) echo $title ?>" class="form-control" id="exampleInputEmail3" >
        <input type="submit" class="btn btn-default" value="搜索"/>
        <input type="button" onclick="res({$id})" value="全部显示" class="btn btn-default"/>
    </form>
</div>
<table class="layui-table">
    <thead>
    <tr>
        <th>订单号</th>
        <th>结算时间</th>
        <th>总金额(元)</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {foreach $result as $val}
    <tr>
        <td>{$val.ordernumber}</td>
        <td>{$val.date}</td>
        <td>{$val.total}</td>
        <td>
            <button onclick="detail({$val.ordernumber})" type="button" class="btn btn-info btn-xs" >详情</button>
        </td>
    </tr>
    {/foreach}
    </tbody>
</table>
{$result->render()}
</body>
<script>
    //显示全部
    function res(id) {
        window.location.href = "{:url('index/postbusiness/recordsettlement')}?id="+id;
    }
    //详情
    function detail(ordernumber) {
        window.location.href = "{:url('index/postbusiness/recorddetail')}?ordernumber="+ordernumber;
    }
</script>
</html>